﻿@inject IStringLocalizer<BootstrapBlazor.Shared.Samples.Menus> Localizer

<Menu Items="@IconItems" DisableNavigation="true" />

@code {
    [NotNull]
    private IEnumerable<MenuItem>? IconItems { get; set; }

    /// <summary>
    /// OnInitialized 方法
    /// </summary>
    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();

        IconItems = await MenusDataGerator.GetTopIconItemsAsync(Localizer);
    }
}
